package com.alex.basic.dao.hibernate;


import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.alex.basic.domain.BasicEntity;

public class BasicDao implements EntityDao{
	
	protected Logger log = LoggerFactory.getLogger(getClass());

	@Autowired
	private SessionFactory sessionFactory;
	
	public void delete(String id) {
	}

	public void remove(String[] ids) {
		
	}

	public void save(BasicEntity entity) {
		sessionFactory.getCurrentSession().save(entity);
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
	
	public Session getSession(){
		return sessionFactory.getCurrentSession();
	}
}
